package top.sssd.auth.model.userRole.converter;

import java.time.LocalDateTime;

import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;
import top.sssd.auth.model.userRole.dto.UserRoleDto;
import top.sssd.auth.model.userRole.entity.UserRole;
import top.sssd.auth.model.userRole.request.UserRoleSaveOrUpdateReq;
import top.sssd.auth.model.userRole.response.UserRoleResp;


/**
 * @author sssd
 * @description 用户角色关联表 Converter转换类
 * @create ${time.now}
 * @version: 1.0.0-SNAPSHOT
 */
@Mapper
public interface UserRoleConverter {

    UserRoleConverter INSTANCE = Mappers.getMapper(UserRoleConverter.class);

    UserRoleResp entityToResp(UserRole userRole);

    UserRole saveOrUpdateUserRoleReqToEntity(UserRoleSaveOrUpdateReq userRoleSaveOrUpdateReq);

    UserRole dtoToEntity(UserRoleDto userRoleDto);

    UserRoleDto entityToDto(UserRole userRole);

}

